package com.unireport.dbbean;

// Generated 2012-5-2 22:17:44 by Hibernate Tools 3.4.0.CR1

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * WebjobSyncSql generated by hbm2java
 */
@Entity
@Table(name = "WEBJOB_SYNC_SQL", schema = "DATAMANAGER")
@SequenceGenerator(name="seq_webjob_sql_id", sequenceName="seq_webjob_sql_id",allocationSize=1)
public class WebjobSyncSql implements java.io.Serializable {

	private int sqlId;
	private WebjobSyncDef webjobSyncDef;
	private String sqlType;
	private String tableName;
	private String sqlText;
	private int priority;
	private short valFlag;
	private String remark;

	public WebjobSyncSql() {
	}

	public WebjobSyncSql(int sqlId, WebjobSyncDef webjobSyncDef,
			String sqlType, int priority, short valFlag) {
		this.sqlId = sqlId;
		this.webjobSyncDef = webjobSyncDef;
		this.sqlType = sqlType;
		this.priority = priority;
		this.valFlag = valFlag;
	}

	public WebjobSyncSql(int sqlId, WebjobSyncDef webjobSyncDef,
			String sqlType, String tableName, String sqlText, int priority,
			short valFlag, String remark) {
		this.sqlId = sqlId;
		this.webjobSyncDef = webjobSyncDef;
		this.sqlType = sqlType;
		this.tableName = tableName;
		this.sqlText = sqlText;
		this.priority = priority;
		this.valFlag = valFlag;
		this.remark = remark;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seq_webjob_sql_id")
	@Column(name = "SQL_ID", unique = true, nullable = false, precision = 8, scale = 0)
	public int getSqlId() {
		return this.sqlId;
	}

	public void setSqlId(int sqlId) {
		this.sqlId = sqlId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "RP_ID", nullable = false)
	public WebjobSyncDef getWebjobSyncDef() {
		return this.webjobSyncDef;
	}

	public void setWebjobSyncDef(WebjobSyncDef webjobSyncDef) {
		this.webjobSyncDef = webjobSyncDef;
	}

	@Column(name = "SQL_TYPE", nullable = false, length = 10)
	public String getSqlType() {
		return this.sqlType;
	}

	public void setSqlType(String sqlType) {
		this.sqlType = sqlType;
	}

	@Column(name = "TABLE_NAME", length = 40)
	public String getTableName() {
		return this.tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	@Column(name = "SQL_TEXT", length = 0)
	public String getSqlText() {
		return this.sqlText;
	}

	public void setSqlText(String sqlText) {
		this.sqlText = sqlText;
	}

	@Column(name = "PRIORITY", nullable = false, precision = 8, scale = 0)
	public int getPriority() {
		return this.priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	@Column(name = "VAL_FLAG", nullable = false, precision = 4, scale = 0)
	public short getValFlag() {
		return this.valFlag;
	}

	public void setValFlag(short valFlag) {
		this.valFlag = valFlag;
	}

	@Column(name = "REMARK", length = 256)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

}
